﻿@model Parichay.Domain.MemberPosts

@{
    ViewBag.Title = "Post Details";
}
@section Styles {
<link href="@Url.Content("~/Content/Styles/jquery.ui.css")" rel="stylesheet" type="text/css" />

}

@section Scripts
{
<script src="@Url.Content("~/Content/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function ($) {

        $('DIV.modalWin').dialog({ autoOpen: false }); // or hide in css
        //$('DIV.modalWin').modal();


        $('a.openModal').click(function () {
            var divNm = '#' + $(this).attr('data-name');
            $(divNm).dialog('open');
        });

        $('DIV.rplyBox').toggle('slow');

        $('a.showreply').click(function () {
            var divNm = '#' + $(this).attr('data-name');
            $(divNm).toggle('slow');
        });
    });
</script>
}
<h2>Post Details</h2>

<fieldset>
    <legend>Replies to Post</legend>
    @if (Model != null)
    {
         <div class="cmtMainBox">
     <div class="cmtHeading"><span>My Post:</span></div>
        @Html.Partial("BO/post", Model)
        </div>
@Html.Partial("reply", new Parichay.Domain.MemberReplies() { Sender = new Parichay.Domain.MemberDetails() { Id = ((Parichay.Domain.Models.CustomIdentity)User.Identity).UserKey }, Parent = Model })                                       
    }
    else
    {
        <p>Sorry something went wrong. Perhaps the post was deleted by the sender.</p>
    }
   
</fieldset>
